//
//  ILButton.m
//  YiQiTingShu
//
//  Created by dllo on 15/11/4.
//  Copyright © 2015年 直到世界的尽头. All rights reserved.
//

#import "ILButton.h"

@implementation ILButton

-(UIImageView *)leftImageView
{
    if (!_leftImageView) {
        _leftImageView = [[UIImageView alloc] initWithFrame:FitRectMake(5, 5, 30, 30)];
    }
    return _leftImageView;
}

-(UILabel *)rightLabel
{
    if (!_rightLabel) {
        _rightLabel = [[UILabel alloc] initWithFrame:FitRectMake(40, 5, 100, 30)];
        _rightLabel.textColor = [UIColor whiteColor];
    }
    return _rightLabel;
}

-(void)setKind:(NSInteger)kind
{
    _kind = kind;
    
    self.leftImageView.frame = CGRectMake(7, 7, 20, 20);
    self.rightLabel.frame = CGRectMake(30, 0, 50, 30);
    self.rightLabel.font = [UIFont systemFontOfSize:15];
}

-(void)layoutSubviews
{
    [super layoutSubviews];
    
    [self addSubview:self.leftImageView];
    [self addSubview:self.rightLabel];
}

@end
